package com.yuqih.common.event;

public class RefreshEvent<T> {

	private final Class<T> type;
	private final Object id;
	private final RefreshEventType eventType;
	private final Object content;

	/**
	 * @param type
	 * @param id
	 * @param event
	 */
	public RefreshEvent(Class<T> type, Object id, RefreshEventType eventType) {
		super();
		this.type = type;
		this.id = id;
		this.eventType = eventType;
		this.content = null;
	}

	/**
	 * @param type
	 * @param id
	 * @param eventType
	 * @param content
	 */
	public RefreshEvent(Class<T> type, Object id, RefreshEventType eventType, Object content) {
		super();
		this.type = type;
		this.id = id;
		this.eventType = eventType;
		this.content = content;
	}



	/**
	 * @return the type
	 */
	public Class<T> getType() {
		return type;
	}

	/**
	 * @return the id
	 */
	public Object getId() {
		return id;
	}

	/**
	 * @return the eventType
	 */
	public RefreshEventType getEventType() {
		return eventType;
	}

	/**
	 * @return the content
	 */
	public Object getContent() {
		return content;
	}

}
